-
Notifications
You must be signed in to change notification settings - Fork 717
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: Allow inline comments in clamd.conf #1308
base: main
Are you sure you want to change the base?
Conversation
Thanks for the PR! I will try to review this after we have things lined up to publish 1.4.0, or after 1.4.0 ships. |
ef7d483
to
8e9d15f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I rebased this PR to re-run the tests.
I found just minor clang-format issues.
In manual testing, I found that for string-based options (vs bool, size, or number args) -- spaces before a #
end up getting included in the option value.
For example, I tried this for freshclam.conf
:
DatabaseMirror http://localhost:8000 # database.clamav.net
The result was that it tried to download daily.cvd
from:
http://localhost:8000 /daily.cvd
(with a space in the middle).
I would have to remove the space between 8000
and #
to make it work. Like this:
DatabaseMirror http://localhost:8000# database.clamav.net
But this doesn't look very natural and is bound to get complaints from users that try this feature.
I also had trouble with getting a bool to work. I tried this in freshclam.conf
, but it didn't enable verbose mode:
LogVerbose yes #no
…ths/clamav into fix/allow-inline-comments
Yeah, the Tried to see how I could implement a test for this fix, but I'm not sure if its possible to printout the options even in debug mode, as its managed in Other caveatIf someone has |
This PR attempts to resolve the issue mentioned in #1175
#
and if it does, try to get the content on its left side.Thoughts:
strtok
is the best choice.cli_regexec
returns the made matches (most likely in the 4th argument, but it seems its used mostly withNULL
through out the project).